Skip to content

Comments

Update API and municipality code format#100

Merged
mhieta merged 3 commits intomainfrom
RATYK-163/municipality-code-updates
Feb 24, 2026
Merged

Update API and municipality code format#100
mhieta merged 3 commits intomainfrom
RATYK-163/municipality-code-updates

Conversation

@mhieta
Copy link
Contributor

@mhieta mhieta commented Feb 23, 2026

Updates:

  • BREAKING CHANGE: Detail endpoints removed for address, municipality and postal code area resources. Clients must use list endpoints with filters instead of retrieving resources by ID.
  • Convert municipality codes from integers to 3-character strings with leading zeros to ensure proper representation and consistency across the codebase.
  • Add municipality filter parameters to MunicipalityViewSet with OpenAPI documentation

Refs: RATYK-158, RATYK-163

@azure-pipelines
Copy link

PAIKKATIETOHAKU-API branch is deployed to platta: https://paikkatietohaku-api-pr100.api.dev.hel.ninja 🚀🚀🚀

Convert municipality codes from integers to 3-character strings
with leading zeros to ensure proper representation and
consistency across the codebase.

Changes:
- Update MUNICIPALITIES constant to use 3-char string codes
  (e.g., 91 → "091")
- Modify municipality and address import services to convert
  codes using str(int(code)).zfill(3)
- Update all factories and tests to use 3-character string
  codes consistently

Refs: RATYK-163
- Add municipality filter parameters to MunicipalityViewSet
  with OpenAPI documentation
- Add comprehensive tests for municipality filtering by name
  and code

Refs: RATYK-163
BREAKING CHANGE: Detail endpoints removed for address,
municipality and postal code area resources. Clients must
use list endpoints with filters instead of retrieving
resources by ID.

Remove retrieve/detail endpoints from AddressViewSet,
MunicipalityViewSet and PostalCodeAreaViewSet, leaving
only the list endpoint available for each resource.

Update postal code area translation test to use list
endpoint with postalcode filter instead of detail
endpoint.

Refs: RATYK-158
@mhieta mhieta force-pushed the RATYK-163/municipality-code-updates branch from 70c2829 to 722e244 Compare February 24, 2026 05:03
@mhieta mhieta marked this pull request as ready for review February 24, 2026 05:04
@mhieta mhieta requested a review from a team as a code owner February 24, 2026 05:04
@sonarqubecloud
Copy link

@azure-pipelines
Copy link

PAIKKATIETOHAKU-API branch is deployed to platta: https://paikkatietohaku-api-pr100.api.dev.hel.ninja 🚀🚀🚀

Copy link

@charn charn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍 :shipit:

@mhieta mhieta merged commit f82664e into main Feb 24, 2026
27 checks passed
@mhieta mhieta deleted the RATYK-163/municipality-code-updates branch February 24, 2026 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants